/*
 * ISourceBuilder.h
 *
 *  Created on: 26 juin 2011
 *      Author: Pierrick Caillon <pierrick@megami.fr>
 */

#ifndef ISOURCEBUILDER_H_
#define ISOURCEBUILDER_H_
#include <vector>
#include <istream>

class ISource;

class SourceBuilder
{
public:
	typedef bool (*validityFunction)();
	typedef ISource* (*instantiateFunction)();
protected:
	SourceBuilder();
public:
	virtual ~SourceBuilder();
	static ISource *get_FirstSource();
	static void RegisterBuilder(instantiateFunction constructor,
			validityFunction check);
	class Registrer
	{
	public:
		Registrer(instantiateFunction constructor, validityFunction check);
	};
};

#endif /* ISOURCEBUILDER_H_ */
